package fh;

import fh.resolver.FormModel;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@Controller
public class UserController {

    @PostMapping("/users/create")
    public void saveUser(
        	@FormModel("u") User user,
            @FormModel("d") Dept dept, 
            @FormModel("r") List<Role> roles
    ) {
        // 
        System.out.println("用户名：" + user.getUsername());
        System.out.println("部门ID：" + dept.getId());
        System.out.println("角色个数：" + roles.size());
    }
    
}